package org.example.corpus.corpuscenter.service;

import java.util.concurrent.TimeUnit;

public interface RedisService {

    void setString(String key, String value);

    void setStringWithExpire(String key, String value, long timeout, TimeUnit unit);

    void setJson(String key, Object value);

    void setJsonWithExpire(String key, Object value, long timeout, TimeUnit unit);

    String getString(String key);

    <T> T getJson(String key, Class<T> clazz);

    void deleteKey(String key);

    boolean hasKey(String key);

    void refreshExpire(String key, long timeout, TimeUnit unit);
}
